

    function addQuestionsMoudle() {
        var index=[2,3,4,5,6,7,8,9,10,11];


        for (var i=0;i<10;i++){

            for (var j=0;j<$(".form-control").eq(index[i]).find("option").length;j++){

                $(".form-control").eq(index[i]).find("option").eq(j).show();

            }
        }
        var moudlename=$("#moudle-name").val();
        var scopeid=$("#scope").val();
        var questionsid=[];
        if ($("#indexModeltitle").html()=="添加模组"){
            $("#moudle-id").val("");
        }
        var id=$("#moudle-id").val();
        for (var i=0;i<10;i++){
            questionsid.push($(".form-control").eq(index[i]).val())
        }
        var jsonString=JSON.stringify(questionsid)
        console.log(jsonString)
        $.ajax({
            url: "addQuestionMoudle.action",
            type: "post",
            async: "true",
            dataType: "json",
            contentType: "application/x-www-form-urlencoded;charset=utf-8",
            data: {
                "moudleEntity.id":id,
                "moudleEntity.moudlename":moudlename,
                "moudleEntity.scopeId":scopeid,
                "questionsid":jsonString
            },
            success: function (data) {
                    alert(data.msg);
                    getMoudles()
            },
            error: function () {
                alert("请求错误");
            }
        })

    }